package com.zzx.project.service.impl;

import com.zzx.project.dao.CommentDao;
import com.zzx.project.entity.Comment;
import com.zzx.project.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    CommentDao commentDao;

    @Override
    public int addComment(Comment comment) {
        return commentDao.addComment(comment);
    }

    @Override
    public List<Comment> getCommentsByAid(int aid) {
        return commentDao.getCommentsByAid(aid);
    }
}
